package apiday04homework;

import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        /*
        String[] array = {"one", "two", "three", "four", "five"};
        System.out.println("array:"+ Arrays.toString(array));

        List<String> list = Arrays.asList(array);
        System.out.println("list:"+list);

        list.set(0, "zero");
        System.out.println("array:"+ Arrays.toString(array));
        System.out.println("list:"+list);

        array[2] = "six";
        System.out.println("array:"+ Arrays.toString(array));
        System.out.println("list:"+list);

         */
        String[] arr = {"one", "two", "three", "four", "five", "six"};
        System.out.println("arr:"+ Arrays.toString(arr));

        List<String> list = Arrays.asList(arr);
        System.out.println("list:"+list);

        arr[0] = "zero";
        System.out.println("arr:"+ Arrays.toString(arr));
        System.out.println("list:"+list);

        list.set(3, "seven");
        System.out.println("arr:"+ Arrays.toString(arr));
        System.out.println("list:"+list);
     }
}
